//购物车View

import React, {Component} from 'react';
import {
    View,
    StyleSheet,
    Image,
    Text,
    TouchableOpacity,
    ScrollView,
    Animated,
    PanResponder,
    Easing,
    Alert
} from 'react-native';
import { inject, observer } from 'mobx-react';

@inject("cartGoods")
@observer
export default class Cart extends Component {
    constructor(props){
        super(props);
    }
    render(){
        const {cartGoods} = this.props;
        return(
            <View>
                <ScrollView
                    keyboardShouldPersistTaps='always' 
                    keyboardDismissMode='interactive'>
                {
                    cartGoods.allDatas.map((item,index) =>{
                        return (
                            <View key={index}>
                                <Text>名称：{item.name}</Text>
                                <Text>价格：{item.price}</Text>
                                <Text>数量：{item.count}</Text>
                            </View>
                        )
                    })
                }
                </ScrollView>
            </View>
        )
    }
}